package com.atguigu.gulimall.product;

import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cache.annotation.EnableCaching;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.cloud.openfeign.EnableFeignClients;
import org.springframework.session.config.annotation.web.http.EnableSpringHttpSession;
import org.springframework.session.data.redis.config.annotation.web.http.EnableRedisHttpSession;


/**
 *  8、整合SpringCache简化缓存开发
 *       4、原理
 *       CacheAutoConfiguration ->RedisCacheConfiguration -> 自动配置了 RedisCacheManager -> 初始化所有的缓存 -> 每个缓存决定使用什么配置 ->如果redisCacheConfiguration有就用已有的，没有就用默认的 ->  想改缓存的配置，只需要把容器中放一个 RedisCacheConfiguration 即可  ->  就会应用到当前 RedisCacheManager管理所有缓存分区中
 */


@EnableRedisHttpSession
@EnableCaching
@EnableFeignClients(basePackages = "com.atguigu.gulimall.product.feign")
@EnableDiscoveryClient
@MapperScan("com.atguigu.gulimall.product.dao")
@SpringBootApplication
public class GulimallProductApplication {

    public static void main(String[] args) {
        SpringApplication.run(GulimallProductApplication.class, args);
    }

}
